<meta charset="UTF-8"/>
<?php

$uploaddir = '/var/www/uploads/';


$uploadfile = $uploaddir . basename($_FILES['files']['name'][0]);

echo $_FILES['userfile']['name'][0];

if (move_uploaded_file($_FILES['files']['tmp_name'][0], $uploadfile)) {
    echo "Success.\n";
} else {
    echo "ERROR!\n";
}
